<script setup lang="ts">
import { ref } from "vue";
import Son from "./son.vue";
import Dialog from "./dialog.vue";
import Dialog2 from "./dialog2.vue";
import DialogModelValue from "./dialogModelValue.vue";
defineProps<{ msg: string }>();

const count = ref(0);
const visiable = ref(false);
setInterval(() => {
  count.value++;
  console.log("count", count.value);
}, 2000);
// setTimeout(() => {
//   visiable.value = !visiable.value;
// }, 5000);
</script>

<template>
  <Son :count="count" />
  <!-- <Dialog
    :visiable="visiable"
    @changeVisible="
      (value) => {
        visiable = value;
      }
    "
  /> -->
  <!-- <Dialog2 v-model="visiable" v-model:title="count" /> -->
  <DialogModelValue v-model="visiable" v-model:title="count" />
  <h1>{{ msg }}</h1>

  <el-button @click="visiable = !visiable">点击</el-button>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
